package com.object.oriented.exam.system5.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.object.oriented.exam.system5.entity.Answer;
import com.object.oriented.exam.system5.entity.AnswerVo;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author xdf
 * @date 2023-06-14
 */
public interface AnswerService {
    /**
     * 教师对（主观）题目进行评分
     * @param answer 需要分数和学生作答answer的id
     * @return
     */
    Boolean markAnswer(Answer answer);

    /**
     * 学生提交答案
     * @param answer
     * @return
     */
    Boolean commitAnswer(Answer answer);

    /**
     * 分页获取某学生某次考试的作答的答案
     * @param studentId
     * @param examId
     * @param current
     * @param size
     * @return
     */
    Page<AnswerVo> getAnswer(Long studentId, Long examId, Long current, Long size);

    List<Long> getStudent(Long examId, Long current, Long size);

    /**
     * 分页获取学生做题记录（不局限于某次考试）
     * @param studentId
     * @param current
     * @param size
     * @return
     */
    Page<AnswerVo> getAnswer(Long studentId, Long current, Long size);

    /**
     * 获取错题
     * @param studentId
     * @param current
     * @param size
     * @return
     */
    Page<Answer> getErrorAnswer(Long studentId,  Long current,  Long size);

    /**
     *学生做的总的题目数量
     */
    Integer totalAnswer(Long studentId);

}
